<template>
  <div class="hello">
    <Poem/>
    <weather top="0"/>
    <img src="../assets/logo.png">
    <h1>{{ msg }}</h1>
    <!--<h2>Essential Links</h2>-->
    <h2>Vue dome</h2>
    <ul>
      <li>
        <a href="javascript:;" @click="go('/comments')">
          Comments
        </a>
      </li>
      <li>
        <a href="javascript:;" @click="go('/todos')">
          Todos
        </a>
      </li>
      <li>
        <a href="javascript:;" @click="go('/axios')">
          Axios
        </a>
      </li>
      <li>
        <a href="javascript:;" @click="go('/users')">
          Users
        </a>
      </li>
      <br>
      <li>
        <a href="javascript:;" @click="go('/childrenRouter')">
          childrenRouter
        </a>
      </li>
    </ul>
    <h2>Ecosystem</h2>
    <ul>
      <li>
        <a href="http://router.vuejs.org/">
          vue-router
        </a>
      </li>
      <li>
        <a href="http://vuex.vuejs.org/">
          vuex
        </a>
      </li>
      <li>
        <a href="http://vue-loader.vuejs.org/">
          vue-loader
        </a>
      </li>
      <li>
        <a href="https://github.com/vuejs/awesome-vue">
          awesome-vue
        </a>
      </li>
      <li>
        <a href="/#/first">
          firstVue
        </a>
      </li>
    </ul>
    <el-button type="primary" @click="go('/first')" size="medium">搜索Github的大佬</el-button>
    <el-button type="success" @click="go('/music')" size="medium">来首音乐吧</el-button>
    <!-- <el-button type="success" @click="">来一句古诗</el-button> -->
  </div>
</template>

<script>
import Poem from './poem/poem.vue'
import Weather from './weather/Weather'
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  components: {
    Weather,
    Poem
  },
  methods: {
    go (str) {
      this.$router.push(str)
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.hello{
  margin-top: 20px;
  text-align: center;
}
</style>
